package com.naiterui.ehp.bs.cms.modules.base.controller.inner;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.naiterui.ehp.bp.bo.cms.AgreementBO;
import com.naiterui.ehp.bp.security.annotation.AnonymousGetMapping;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.cms.modules.base.service.IAgreementService;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 协议管理
 * 
 * @author yangfuya
 * @since 2021/10/12
 */
@Slf4j
@AllArgsConstructor
@RestController
@RequestMapping("/inner/base/agreement")
public class InnerAgreementController {
    private final IAgreementService iAgreementService;

    @AnonymousGetMapping("/{type}")
    public AgreementBO getByType(@PathVariable("type") String type) throws BusinessException {
        return iAgreementService.getByType(type);
    }

}
